<template>
  <div
    class="good-list-item"
    @click="$router.push('/goodsdetial?id=' + data.id)"
  >
    <img
      v-if="data.isLatest === 1"
      class="sanjiao"
      src="../../assets/images/home/new-j.png"
      alt=""
    />
    <img
      v-if="data.isHotSale === 1"
      class="sanjiao"
      src="../../assets/images/home/hot-j.png"
      alt=""
    />
    <img :src="data.coverImg | srcFormat" alt="" />
    <div class="name">{{ data.name }}</div>
    <div class="coin">
      {{ data.coin }}
      <img src="../../assets/images/home/monad.png" alt="" />
    </div>
    <div class="btn">立即兑换</div>
  </div>
</template>
 
<script>
export default {
  props: ["data", "data2"],
  data() {
    return {};
  },
};
</script>
 
<style lang = "less" scoped>
.good-list-item {
  cursor: pointer;
  background-color: #fff;
  position: relative;
  width: 285px;
  height: 410px;
  text-align: center;
  padding-bottom: 60px;
  img {
    width: 285px;
    height: 300px;
    overflow: hidden;
  }
  .sanjiao {
    position: absolute;
    top: 0;
    left: 0;
    width: 50px;
    height: 50px;
  }
  .name {
    margin-top: 22px;
    font-size: 18px;
    font-weight: 300;
    color: #333;
    line-height: 18px;
    margin-bottom: 20px;
  }
  .coin {
    font-size: 18px;
    font-weight: bold;
    color: #ff5e0f;
    line-height: 23px;
    margin-bottom: 20px;
    img {
      width: 20px;
      height: 20px;
      vertical-align: middle;
      margin-left: 10px;
    }
  }
  .btn {
    width: 100px;
    height: 36px;
    border: 1px solid #0a328e;
    display: inline-block;
    line-height: 36px;
    color: #0a328e;
  }
}
.good-list-item:hover {
  box-shadow: 0px 15px 30px rgba(0, 0, 0, 0.1);
  transition: 0.75s;
  transform: translate3d(0, -15px, 0);
}
.good-list-item:hover .btn {
  background-color: #0a328e;
  color: #fff;
  transform: scale(1.1);
}
</style>